<?php
/**
 * 作品展示
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package 古槐乡情
 * @subpackage 2017-01
 * @since 1.0
 * @version 1.0
 */

get_header(); ?>
   <link rel="stylesheet" href="<?php autoVer(bloginfo('template_url').'/css/viewer.min.css');?>" type="text/css">
   <link rel="stylesheet" href="<?php autoVer(bloginfo('template_url').'/css/ulli.css');?>" type="text/css">

   <div style="overflow:hidden; width:0px; height:0; margin:0 auto; position:absolute; top:-800px;">
      <img src="<?php echo echo_first_image_one($post->ID); ?>" width="0" height="0" />
   </div>

   <div class="row">
      <div class="single-title">
         <h2><?php the_title(); ?></h2>
         <?php $category = get_the_category(); ?>
         <footer><?php echo $category[0]->cat_name;?> / <?php the_time('Y-m-d'); ?></footer>
      </div>
      <div class="col-md-offset-5 col-md-5">
        <div class="post-like">
            <a href="javascript:;" data-action="ding" data-id="<?php the_ID(); ?>" class="favorite<?php if(isset($_COOKIE['bigfa_ding_'.$post->ID])) echo ' done';?>">
                <i class="glyphicon glyphicon-thumbs-up"></i>&nbsp;赞<span class="count">
                    <?php if( get_post_meta($post->ID,'bigfa_ding',true) ){
                        echo get_post_meta($post->ID,'bigfa_ding',true);
                    } else {
                    echo '0';
                    }?>
                </span>
            </a>
        </div>
        <div class="post-like">
            <a tabindex="0" role="button" data-toggle="popover" data-trigger="focus" data-placement="bottom" title="微信二维码"><i class="glyphicon glyphicon-qrcode"></i>&nbsp;微信分享</a>
        </div>

        <div id="LinkDIV" style="float:left;width:200px;display:none;">
            <img src="http://api.qrserver.com/v1/create-qr-code/?size=200x200&data=<?php the_permalink(); ?>" alt="QR:  <?php the_title(); ?>" />
        </div>
    </div>
    <div style="clear:both"></div>
      <div class="intro">
         <?php echo_first_image($post->ID);?>
      </div>
   </div>
  <div class="entry">
        <a href="http://www.xianhall.com">古槐乡情(www.xianhall.com)</a>尊重原创作者及版权，转载请注明作者与出处。
  </div>

   <script type="text/javascript" src="<?php bloginfo('template_url');?>/js/viewer.min.js"></script>

   <script type="text/javascript">
      $(function () {
         var options = {
            url: 'data-original',
            toolbar:true
         };
         $('.images').viewer(options);   
      })
   </script>
<?php get_footer(); ?>